<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App\Handlers\WeconHandler;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis;
use SimpleSoftwareIO\QrCode\Facades\QrCode;

class DedustingFeedback extends Model
{
    const STATUS_YES = 1;
    const STATUS_NO = 0;
    const STATUS_TEXT = ['0' => '未处理', '1' => '已处理'];

    const IMAGE_PATH = 'dedusting/feedback/image';
    const VIDEO_PATH = 'dedusting/feedback/video';

    protected $table = 'xfy_dedusting_feedbacks';

    public function repairs()
    {
        return $this->hasMany(DedustingRepair::class);
    }

    public function poster()
    {
        return $this->belongsTo(DedustingUser::class, 'user_id');
    }

}